package com.mmz.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import com.mmz.domain.Product;

public class ProductDao {
	
	private SessionFactory sessionFactory;
	
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	public void save(Product product){
		System.out.println(product);
		Session session = sessionFactory.getCurrentSession();
		session.save(product);
	}
}
